\section{Empirical Study}
\label{sec:empiricalStudy}

\begin{figure*}
\centering
\subfigure[ZigBee (DSSS)]{\includegraphics[width=0.245\textwidth]{figure/ZigBee.pdf}}
\subfigure[802.11n (OFDM)]{\includegraphics[width=0.245\textwidth]{figure/80211n.pdf}}
\subfigure[Bluetooth (FHSS)]{\includegraphics[width=0.245\textwidth]{figure/BT.pdf}}
\subfigure[Microwave oven]{\includegraphics[width=0.245\textwidth]{figure/MO.pdf}}
\caption{RSSI patterns of co-existing technologies}
\label{fig:characteristics}
\end{figure*}

In this section, we firstly present characteristic RSSI sequences of different wireless technologies and then state the feasibility of distinguishing ZigBee from the channel RSSI sequence.




\subsection{Characterize different technologies in controlled environments}
In this subsection, we analyze the RSSI patterns of various co-existing technologies.
We conduct experiments in controlled environments to observe the sampled RSSI during their transmissions.
We place a TelosB node as receiver in a clear environment and put the devices operating common wireless technologies in turn.
TinyOS provides RSSI information together with the received packets.
To sample the RSSI without packet received, we modify the drivers of CC2420 in TinyOS-2.1.2.
We augment CC2420 driver with an interface which reads the RSSI register in CC2420 directly.
We achieve a sampling rate 31.25 KHz (32us/sample).
Figure \ref{fig:characteristics} presents the RSSI sequence of different co-existing signal sources.
The different forms presented by different transmitters is because of their distinguishable behaviors such as the modulation scheme, specific transmitting pattern and so on.

\textbf{ZigBee}.
%The underlaying standard of ZigBee is IEEE 802.15.4.
%The central frequencies of these channels are defined as:
%$F_{c}=2405+5(k-11)$ MHz, for $k=11,12,...,26$, where $k$ is the channel number.
%ZigBee is based on IEEE 802.15.4 \cite{bib:802.15.4} which specifies Direct Sequence Spread Spectrum (DSSS) as modulation technique in 2.4GHz.
%DSSS modulation presents a flat RSSI sequence of ZigBee signal.
%Besides, the underlaying standard,
ZigBee devices operate in the range from 2400MHz to 2483.5MHz, which is divided into 16 channels and 5MHz bandwidth for each channel.
Figure \ref{fig:characteristics} (a) presents the RSSI sequence of ZigBee signal.
IEEE 802.15.4 \cite{bib:802.15.4}, underlaying standard of ZigBee, specifies some other characteristics of its transmissions.
For example, the packet length is at least 11 bytes and at most 133 bytes, rusting in a bounded on-air time.

\textbf{WiFi}.
According to IEEE 802.11 Wireless LAN (WLAN) \cite{bib:802.11} specifications, WiFi devices operate in 13 channels in 2.4GHz band, each with a bandwidth of 22MHz and a channel separation of 5MHz.
%The central frequencies of these channels are:
%$F_{c}=2407 + 5 \times k$ MHz, for $k=1,2,...,13$, where $k$ is the channel number.
Figure \ref{fig:characteristics} (b) shows the RSSI sequence of 802.11n router's transmissions.
The RSSI sequence generally has a large range during one packet's transmission.
Because of Orthogonal Frequency-Division Multiplexing (OFDM) and Quadrature Amplitude Modulation (QAM), the modulation techniques adopted by 802.11g/n have multiple sub-carriers.
Each subcarrier has certain level variation of energy amplitude.
Since the transmitted signal is a sum of the signals on all the orthogonal sub-carriers, the added variation of sub-carriers will be much larger than single carrier.
Hence, spurious high power peaks occur when signals from different sub-carriers add constructively.
Namely, the addition of these independently modulated tones causes the discrete time signal exhibit large power peaks \cite{bib:PAPR}.
This is an intrinsic feature of multi-carrier modulation technologies, while the modulation techniques based on spread spectrum have no such feature.
Hence, 802.11n, different from ZigBee, shows out a significantly fluctuated RSSI sequence.
Specifications of 802.11 also give some distinctions with other technologies, such as the short interval between packets and short on-air time.

\textbf{Bluetooth}.
Bluetooth is a wireless technology widely used in Bluetooth mouse, keyboard, headset and other peripherals.
The underlaying standard of Bluetooth is 802.15.1 \cite{bib:802.15.1} which operates in 79 channels, each with a bandwidth of 1MHz and a channel separation of 1MHz.
%The channel centre frequencies are defined by the formula:
%$F_{c}=2402 + k$ MHz, for $k=0,1,...,78$, where $k$ is the channel number.
Bluetooth uses Frequency Hopping Spread Spectrum (FHSS) to transmit a narrow band signal.
As shown in Figure \ref{fig:characteristics}(c), the RSSI sequence of Buletooth is flat as ZigBee since it also uses one-carrier modulation techniques.
Nevertheless, its frequency hopping brings about some outstanding features.
The standard hop rate of Buletooth is 1600 hop/s, i.e., 625us residence time in one channel.
The transmission time on one frequency is typically 366us, resulting in a shorter on-air time compared to ZigBee packets.

\textbf{Microwave oven}.
Microwave ovens operate at around 2.45GHz, which overlaps around 5 channels of ZigBee.
Although they are covered by a Faraday cage, it is still possible for some leakage to occur around the doors.
%Microwave ovens always work in an on and off manner with a frequency same to the alternating current power supply, 50Hz in China and 60Hz in Europe, as shown in .
%It shows out a distinct RSSI sequence pattern.
Figure \ref{fig:characteristics} (d) shows out a distinct RSSI sequence pattern of microwave ovens.
The sequence starts with a decrease below the noise floor and an abrupt increasing and then decreases gradually
%to noise floor when MOV goes to off phase.
%It ends with a slow increase and an sharp decrease below the noise floor and then returns to the noise floor.
The pattern, a decrease of RSSI below the noise floor, is a exclusive characteristic of MOVs, which could be used for recognizing it.



\subsection{Feasibility of using RSSI sequence to distinguish ZigBee}
%Previous section presents ZigBee has distinguishable features of RSSI sequence.
%In this section, we demonstrate the feasibility of using RSSI sequence to recognize ZigBee from on-going transmissions.
%The distinct features of co-existing wireless technologies operated in 2.4GHz is list in Table \ref{tab:features}.
The review of common co-existing wireless technologies describes their distinct features caused by the specifications of physical layer and protocol layer.
The features are summarized  in Table \ref{tab:features}.


\begin{table}[t]
\centering
\caption{Characteristic features of co-existing wireless technologies}
\vspace{1mm}
\begin{tabular*}{8cm}{|>{\centering}p{2.4cm}|>{\centering}p{1.6cm}|>{\centering}p{1.2cm}|p{1.05cm}<{\centering}|}
\hline
Wireless technology & On-air time & MPI & Range\\
%\hline
\hline
ZigBee 802.15.4         &  [352us,4256us]   &   10ms        & $\leq 3$ \\
\hline
WiFi 802.11g/n          &  [194us,542us]    &   28us        & $\geq 5$ \\
\hline
%WiFi 802.11b            &  [202us,1906us]   &   50us        & $\leq 5$ \\
%\hline
Bluetooth 802.15.1      &   336us           &   uncertain   & $\leq 10$   \\
\hline
Microwave ovens         &   10ms            &   10ms        & $\geq 20$   \\
\hline
\end{tabular*}
\label{tab:features}
\end{table}

\textbf{On-air time}. ZigBee has a packet length from 11 bytes to 133 bytes.
Under the 250Kbps, the on-air time of one ZigBee packet is $[352us,4256us]$.
Actually, the shortest packet length is usually not used since it even has no MAC address in it.
Pending basic information, as TinyOS-2.1.2 does, the on-air time should be $[608us,4256us]$.
Unlike ZigBee, 802.11g/n and Buletooth have a shorter on-air time, while microwave ovens have a longer on-air time.

\textbf{MPI}. Minimum Packet Interval (MPI) is the minimum time interval between successive packets.
ZigBee's MPI is defined by the gap adopted in preamble, which is also the time waiting for potential ACK.
This time is 10 ms by default setting in TinyOS-2.1.2.
However, it is refined to 2.8 ms in \cite{bib:IPSN13EnergyLPL} since the measured ACK delay won't take longer than 2.8ms.
On the other hand, 802.11 b/g/n waits at least a DIFS time before next transmission, which is 28us for 802.11 g/n and 50us for 802.11b.
Both of these two DIFS are much shorter than the MPI of ZigBee.
MPI of Bluetooth refers the time between successive packet on the overlapping frequency for the same ZigBee channel.
Since the frequencies of Bluetooth's transmissions follow a pesudorandom hopping, its MPI is uncertain.
The MPI of microwave ovens is defined as the time of off phase, which is 10ms.


%\textbf{Range}. The range of RSSI is defined as the difference between maximum and minimum RSSI.
\textbf{PAPR}. Peak to Average Power Ratio (PAPR) is a common measure of the variation of signal power.
As shown in numerous studies, 802.11 g/n have a large PAPR, usually larger than XXX(???).
While ZigBee and Bluetooth have a relatively small range of RSSI, XXX(???), because they employ one-carrier modulation.
Microwave ovens also have a large PAPR, compared to ZigBee.
%For microwave ovens, the range of RSSI is largest since the drop below noise floor, observed in our experiments.



%
%We use these features to train a classifier based on Support Vector Machine (SVM).
%We collect 10455 RSSI sequences of different wireless technologies.
%%10455 sequences are randomly picked out as testing set, and other 10455 sequences form training set.
%The result of classifier is present in Table \ref{tab:resultSVM}.
%The false positive corresponds to the false wakeups, and the false negative corresponds to the ignoring of ZigBee transmission.
%We could find out false negative ratio is zero and false positive ratio is quite low.
%Hence, based on these features, we could recognize ZigBee with a high probability, without ignoring any ZigBee transmission.
%The results demonstrate the feasibility of using RSSI sequence to distinguish ZigBee.



%
%\begin{table}[t]
%\centering
%\caption{Classification result of SVM}
%\vspace{1mm}
%\begin{tabular*}{8cm}{|>{\centering}p{1.5cm}|>{\centering}p{1.0cm}|>{\centering}p{1.15cm}|p{1.15cm}<{\centering}|p{1cm}<{\centering}|}
%\hline
% & ZigBee & Bluetooth & Microwave & WiFi\\
%%\hline
%\hline
%ZigBee         & 97.8\%     &   0           &    2.1\%      &  0 \\
%\hline
%Bluetooth      &   0        &    71.3\%     &    1.6\%      & 27.1\% \\
%\hline
%Microwave      &   0        &    13.5\%     &    70.0\%     & 16.5\%  \\
%\hline
%WiFi           &   0        &     1.6\%     &    0.2\%      & 98.2\%  \\
%\hline
%\end{tabular*}
%\label{tab:resultSVM}
%\end{table}


